package com.itheima.bufferedinputstreamdemo;

import java.io.*;

public class BufferedInputStreamDemo {

    public static void main(String[] args) {
        try (
                // 把低级的字节输入流包装成高级的缓冲字节输入流
                InputStream fis = new FileInputStream("D:\\git\\java-base\\try.txt");
                InputStream bis = new BufferedInputStream(fis))
        {
            byte[] buffer = bis.readAllBytes();
            System.out.println(new String(buffer));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }

    }
}
